<?php
// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
  }


  $header_template = 'tpl_header.php';
  $footer_template = 'tpl_footer.php';
  $left_column_file = 'column_left.php';
  $right_column_file = 'column_right.php';
  $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
<div id="mainWrapper" class="bg-l">
	<div class="bg-r">
<?php
 /**
  * prepares and displays header output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_header = true;
  }
  require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>
<?php
  if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>
<div style="clear:both;"></div>
<div id="bodyWrapper" >
<?php
if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
  // global disable of column_left
  $flag_disable_left = true;
}
if (!isset($flag_disable_left) || !$flag_disable_left) {
?>
<div id="bodyWrapper-leftColumn">
	<div>
	<?php if (in_array($_GET['main_page'],array('index','product_info','specials','products_new','products_all','advanced_search','product_reviews_write','advanced_search_result'))){?>
	<?php 	require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); //prepares and displays left column sideboxes ?>
	<?php }else{?>
	<?php   require(DIR_WS_MODULES.zen_get_module_directory('column_left_information.php'));?>
	<?php }?>
	</div>
</div>
<?php
}
?>
    <div id="bodyWrapper-middleColumn">
<!-- bof  breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
<div style="clear:both;"></div>
<!-- bof upload alerts -->
<?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
<!-- eof upload alerts -->
<?php
//prepares and displays center column
require($body_code); 
?>
	</div>
</div>
<div style="clear:both;"></div>
<?php
 /**
  * prepares and displays footer output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
  }
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
?>
	</div>
</div>
<?php require(DIR_WS_MODULES.zen_get_module_directory('product_listing_alpha_sorter_vertical.php')); ?>
<div style="position:fixed;right:0;border:1px solid #ccc;bottom:307px;width:30px;text-align:center;background:#555;"><a href="javascript:scroll(0,0)" style="text-align: center;color:#fff;font-weight:bold;">TOP</a></div>
<script type="text/javascript" src="http://s9.cnzz.com/stat.php?id=4423075&amp;web_id=4423075&amp;show=pic"></script>
</body>